/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ElectricBicycle {
    static categoryCode = '040040003';

    static categoryName = '电动自行车';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return ElectricBicycle.categoryCode;
    }

    get categoryName() {
        return ElectricBicycle.categoryName;
    }

    getEnduranceMileage(params) {
        return command({
            method: 'getEnduranceMileage',
            methodId: 'pZwpBgRd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getGpsPosition(params) {
        return command({
            method: 'getGpsPosition',
            methodId: 'pUjL70nr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOnceMileage(params) {
        return command({
            method: 'getOnceMileage',
            methodId: 'pDNVDQwS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOnceRidetime(params) {
        return command({
            method: 'getOnceRidetime',
            methodId: 'p1RY46ZL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSignalIntensity(params) {
        return command({
            method: 'getSignalIntensity',
            methodId: 'pGegeexZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pgyAbB0V',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSearch(params) {
        return command({
            method: 'setSearch',
            methodId: 'pes4SRyC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppbbtWXA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ElectricBicycle;
